home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.output;
-
- import java.awt.Graphics;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Color;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.Polygon;
- import java.awt.Image;
- import java.awt.image.ImageObserver;
-
- /**
- * Specialization of, and wrapper for, Graphics class.<p>
- *
- * This class provides a specialization of the AWT Graphics class that
- * modifies drawing operations slightly to work better with subArctic
- * (e.g., in the area of image drawing), and add some operations for
- * convenience purposes. <p>
- *
- * Since we don't have access to the construction process for Graphics
- * objects, we can't effectively subclass Graphics in the normal way to
- * specialize it. Instead we create a wrapper around an existing Graphics
- * object. For the most part, we just forward all the operations to the
- * wrapped object. Only in a few places do we extend the API.<p>
- *
- * Routines that are not documented here are forwarded directly to the
- * Graphics class (see that class for details).<p>
- *
- * @see java.awt.Graphics
- * @author Scott Hudson
- */
- public class drawable extends Graphics {
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Graphics object that we are a wrapper for */
- protected Graphics g = null;
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Construct a drawable from a Graphics object.
- * @param Graphics wrappee the object we are wrapper around.
- */
- public drawable(Graphics wrappee)
- {
- g = wrappee;
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Override create() to create a new wrapper also. Note: subclasses
- * will typically need to do this also.
- * @return Graphics a new drawable object copied from this one.
- */
- public Graphics create()
- {
- return new drawable(g.create());
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Override create() to create a new wrapper also. Note: subclasses
- * will typically need to do this also.
- *
- * @param int x x component of origin of new drawable
- * @param int y y component of origin of new drawable
- * @param int w width of new drawable
- * @param int h height of new drawable
- * @return Graphics a new drawable object derived from this one.
- */
- public Graphics create(int x, int y, int w, int h)
- {
- return new drawable(g.create(x,y,w,h));
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * New version of create() that returns a drawable. This does exactly
- * the same thing as create(), but is just more accurate about its return
- * type.
- * @return Graphics a new drawable object copied from this one.
- */
- public drawable copy()
- {
- return new drawable(g.create());
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * New version of create() that returns a drawable. This does exactly
- * the same thing as create(), but is just more accurate about its return
- * type.
- *
- * @param int x x component of origin of new drawable
- * @param int y y component of origin of new drawable
- * @param int w width of new drawable
- * @param int h height of new drawable
- * @return Graphics a new drawable object derived from this one.
- */
- public drawable copy(int x, int y, int w, int h)
- {
- return new drawable(g.create(x,y,w,h));
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** An observer object for effectively ignoring observation. */
- protected static ignore_observer _ignore = new ignore_observer();
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Extended draw image that can deal with a loaded_image w/o an observer.
- * If the image has not actually been loaded yet, this will block until
- * it has.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean drawImage(loaded_image img, int x, int y)
- {
- return drawImage(img.image(),x,y,_ignore);
-
- /* note we use our own method here rather than the wrapped object's,
- * so we can override in one place */
- }
-
- /**
- * Extended draw image that can deal with a loaded_image w/o an observer.
- * If the image has not actually been loaded yet, this will block until
- * it has.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width image will be scaled to.
- * @param int h height image will be scaled to.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean drawImage(loaded_image img, int x, int y, int w, int h)
- {
- return drawImage(img.image(),x,y,w,h,_ignore);
- }
-
-
- /**
- * Extended draw image that can deal with a loaded_image w/o an observer.
- * If the image has not actually been loaded yet, this will block until
- * it has.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param Color bgcolor background color.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean drawImage(loaded_image img, int x, int y, Color bgcolor)
- {
- return drawImage(img.image(),x,y,bgcolor,_ignore);
- }
-
-
- /** Extended draw image that can deal with a loaded_image w/o an observer.
- * If the image has not actually been loaded yet, this will block until
- * it has.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width image will be scaled to.
- * @param int h height image will be scaled to.
- * @param Color bgcolor background color.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean drawImage(
- loaded_image img,
- int x, int y,
- int w, int h,
- Color bgcolor)
- {
- return drawImage(img.image(),x,y,w,h,bgcolor,_ignore);
- }
-
- /**
- * subArctic style renaming of drawImage.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean draw_image(loaded_image img, int x, int y)
- {
- return drawImage(img.image(),x,y,_ignore);
-
- /* note we use our own method here rather than the wrapped object's,
- * so we can override in one place */
- }
-
- /**
- * subArctic style renaming of drawImage.
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width image will be scaled to.
- * @param int h height image will be scaled to.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean draw_image(loaded_image img, int x, int y, int w, int h)
- {
- return drawImage(img.image(),x,y,w,h,_ignore);
- }
-
- /**
- * subArctic style renaming of drawImage
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param Color bgcolor background color.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean draw_image(loaded_image img, int x, int y, Color bgcolor)
- {
- return drawImage(img.image(),x,y,bgcolor,_ignore);
- }
-
-
-
- /**
- * subArctic style renaming of drawImage
- *
- * @param loaded_image img the image to be drawn.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width image will be scaled to.
- * @param int h height image will be scaled to.
- * @param Color bgcolor background color.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean draw_image(
- loaded_image img,
- int x, int y,
- int w, int h,
- Color bgcolor)
- {
- return drawImage(img.image(),x,y,w,h,bgcolor,_ignore);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Tiled drawing of a pattern image over an area. The given image is drawn
- * repeatedly to fill the given area.
- *
- * @param loaded_image pattern the pattern to be tiled with the given space.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width of area to tile.
- * @param int h height of area to tile.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean tileImage(loaded_image pattern, int x, int y, int w, int h)
- {
- Image img = pattern.image();
- int size_x = pattern.width();
- int size_y = pattern.height();
- int xpt, ypt;
- Graphics clipped_g;
- boolean v = true;
-
- /* Build a copy of our Graphics object that clips to exactly the size
- * we are clipping into
- */
- clipped_g = g.create();
- clipped_g.clipRect(x,y,w+1,h+1);
-
- /* loop over image area drawing tiles until we have filled it */
- for (ypt = y; ypt-y < h; ypt += size_y)
- for (xpt = x; xpt-x < w; xpt += size_x)
- v = clipped_g.drawImage(img, xpt, ypt, _ignore);
-
- /* return the last return value we got */
- return v;
- }
-
- /**
- * subArctic style renaming of tile_image
- *
- * @param loaded_image pattern the pattern to be tiled with the given space.
- * @param int x x position to place the image at.
- * @param int y y position to place the image at.
- * @param int w width of area to tile.
- * @param int h height of area to tile.
- * @return boolean undocumented return value from AWT drawImage() routine.
- */
- public boolean tile_image(loaded_image pattern, int x, int y, int w, int h)
- {
- return tile_image(pattern, x, y, w, h);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Draw a filled arrowhead polygon at the second end of the given line (this
- * does not draw the line).<p>
- *
- * @param int x1 first x coordinate of the line
- * @param int y1 first y coordinate of the line
- * @param int x2 second x coordinate of the line (arrow
- * head point goes here)
- * @param int y2 second y coordinate of the line (arrow
- * head point goes here)
- * @param int arrow_head_len length of the sides of the arrow head
- * @param int arrow_head_angle angle between each side and the line in
- * degrees
- * @param double arrow_inset percent inset for base of arrow [0..1]
- * (values around 0.60 seem to work well).
- */
- public void fill_arrowhead(int x1, int y1, int x2, int y2,
- int arrow_head_len, int arrow_head_angle, double arrow_inset)
- {
- double dx, dy, len, sin_theta, cos_theta;
- double pt1_x, pt1_y, pt2_x, pt2_y, pt3_x, pt3_y;
- double ah_len = (double)arrow_head_len;
- double ah_angle = Math.PI*((double)arrow_head_angle)/180.0;
- int result1_x, result1_y, result2_x, result2_y, result3_x, result3_y;
-
- /* figure out the length of the line */
- dx = (double)(x2-x1);
- dy = (double)(y2-y1);
- len = Math.sqrt(dx*dx+dy*dy);
-
- /* bail out now if its zero length */
- if (len == 0) return;
-
- /* compute arrow head points if were were on line on x axis */
- pt1_x = len - ah_len*Math.cos(ah_angle);
- pt1_y = ah_len*Math.sin(ah_angle);
- pt2_x = len - (len-pt1_x)*arrow_inset;
- pt2_y = 0;
- pt3_x = pt1_x;
- pt3_y = -pt1_y;
-
- /* compute sin and cos of rotation to get line from x axis current pos */
- sin_theta = dy / len;
- cos_theta = dx / len;
-
- /* rotate and translate to get our final points */
- result1_x = (int)(pt1_x*cos_theta - pt1_y*sin_theta + 0.5) + x1;
- result1_y = (int)(pt1_x*sin_theta + pt1_y*cos_theta + 0.5) + y1;
- result2_x = (int)(pt2_x*cos_theta - pt2_y*sin_theta + 0.5) + x1;
- result2_y = (int)(pt2_x*sin_theta + pt2_y*cos_theta + 0.5) + y1;
- result3_x = (int)(pt3_x*cos_theta - pt3_y*sin_theta + 0.5) + x1;
- result3_y = (int)(pt3_x*sin_theta + pt3_y*cos_theta + 0.5) + y1;
-
- /* draw the arrow head polygon */
- int xs[] = {x2, result1_x, result2_x, result3_x};
- int ys[] = {y2, result1_y, result2_y, result3_y};
- fill_polygon(xs,ys,4);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Draw a filled arrowhead polygon (with good defaults) at the second end
- * of the given line (this does not draw the line).
- *
- * @param int x1 first x coordinate of the line
- * @param int y1 first y coordinate of the line
- * @param int x2 second x coordinate of the line (arrow head point goes here)
- * @param int y2 second y coordinate of the line (arrow head point goes here)
- */
- public void fill_arrowhead(int x1, int y1, int x2, int y2)
- {
- fill_arrowhead(x1,y1,x2,y2, 20, 15, 0.60);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Draw a hollow arrowhead (as lines) at the second end of the given line
- * (this does not draw the line).<p>
- *
- * @param int x1 first x coordinate of the line.
- * @param int y1 first y coordinate of the line.
- * @param int x2 second x coordinate of the line (arrow
- * head point goes here).
- * @param int y2 second y coordinate of the line (arrow
- * head point goes here).
- * @param int arrow_head_len length of the sides of the arrow head.
- * @param int arrow_head_angle angle between each side and the line in
- * degrees.
- * @param double arrow_inset percent inset for base of arrow [0..1]
- * (values around 0.60 seem to work well).
- */
- public void draw_arrowhead(int x1, int y1, int x2, int y2,
- int arrow_head_len, int arrow_head_angle, double arrow_inset)
- {
- double dx, dy, len, sin_theta, cos_theta;
- double pt1_x, pt1_y, pt2_x, pt2_y, pt3_x, pt3_y;
- double ah_len = (double)arrow_head_len;
- double ah_angle = Math.PI*((double)arrow_head_angle)/180.0;
- int result1_x, result1_y, result2_x, result2_y, result3_x, result3_y;
-
- /* figure out the length of the line */
- dx = (double)(x2-x1);
- dy = (double)(y2-y1);
- len = Math.sqrt(dx*dx+dy*dy);
-
- /* bail out now if its zero length */
- if (len == 0) return;
-
- /* compute arrow head points if were were on line on x axis */
- pt1_x = len - ah_len*Math.cos(ah_angle);
- pt1_y = ah_len*Math.sin(ah_angle);
- pt2_x = len - (len-pt1_x)*arrow_inset;
- pt2_y = 0;
- pt3_x = pt1_x;
- pt3_y = -pt1_y;
-
- /* compute sin and cos of rotation to get line from x axis current pos */
- sin_theta = dy / len;
- cos_theta = dx / len;
-
- /* rotate and translate to get our final points */
- result1_x = (int)(pt1_x*cos_theta - pt1_y*sin_theta + 0.5) + x1;
- result1_y = (int)(pt1_x*sin_theta + pt1_y*cos_theta + 0.5) + y1;
- result2_x = (int)(pt2_x*cos_theta - pt2_y*sin_theta + 0.5) + x1;
- result2_y = (int)(pt2_x*sin_theta + pt2_y*cos_theta + 0.5) + y1;
- result3_x = (int)(pt3_x*cos_theta - pt3_y*sin_theta + 0.5) + x1;
- result3_y = (int)(pt3_x*sin_theta + pt3_y*cos_theta + 0.5) + y1;
-
- /* draw the arrow head lines */
- draw_line(x2,y2,result1_x,result1_y);
- draw_line(result1_x,result1_y, result2_x,result2_y);
- draw_line(result2_x,result2_y, result3_x,result3_y);
- draw_line(x2,y2,result3_x,result3_y);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Draw a hollow arrowhead (as lines) at the second end of the given line
- * (this does not draw the line). This version provides good defaults for
- * the arrow size and shape.<p>
- *
- * @param int x1 first x coordinate of the line
- * @param int y1 first y coordinate of the line
- * @param int x2 second x coordinate of the line (arrow head point goes here)
- * @param int y2 second y coordinate of the line (arrow head point goes here)
- */
- public void draw_arrowhead(int x1, int y1, int x2, int y2)
- {
- draw_arrowhead(x1,y1,x2,y2, 20, 15, 0.60);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Find the min and max points bounding the arrowhead that would be drawn
- * at the second point on the given line. <p>
- *
- * @param int x1 first x coordinate of the line
- * @param int y1 first y coordinate of the line
- * @param int x2 second x coordinate of the line (arrow head point goes here)
- * @param int y2 second y coordinate of the line (arrow head point goes here)
- * @param int arrow_head_len length of the sides of the arrow head
- * @param int arrow_head_angle angle between each side and the line in degrees
- * @param double arrow_inset percent inset for base of arrow [0..1]
- * @param Point min_pt returns holding the min x,y of the bound
- * @param Point max_pt returns holding the max x,y of the bound
- */
- public void arrowhead_bound( int x1, int y1, int x2, int y2,
- int arrow_head_len, int arrow_head_angle, double arrow_inset,
- Point min_pt, Point max_pt)
- {
- double dx, dy, len, sin_theta, cos_theta;
- double pt1_x, pt1_y, pt2_x, pt2_y, pt3_x, pt3_y;
- double ah_len = (double)arrow_head_len;
- double ah_angle = Math.PI*((double)arrow_head_angle)/180.0;
- int result1_x, result1_y, result2_x, result2_y, result3_x, result3_y;
- int max_x, max_y, min_x, min_y;
-
- /* figure out the length of the line */
- dx = (double)(x2-x1);
- dy = (double)(y2-y1);
- len = Math.sqrt(dx*dx+dy*dy);
-
- /* bail out now if its zero length */
- if (len == 0)
- {
- min_pt.x = max_pt.x = x1;
- min_pt.y = max_pt.y = y1;
- return;
- }
-
- /* compute arrow head points if were were on line on x axis */
- pt1_x = len - ah_len*Math.cos(ah_angle);
- pt1_y = ah_len*Math.sin(ah_angle);
- pt2_x = len - (len-pt1_x)*arrow_inset;
- pt2_y = 0;
- pt3_x = pt1_x;
- pt3_y = -pt1_y;
-
- /* compute sin and cos of rotation to get line from x axis current pos */
- sin_theta = dy / len;
- cos_theta = dx / len;
-
- /* rotate and translate to get our final points */
- result1_x = (int)(pt1_x*cos_theta - pt1_y*sin_theta + 0.5) + x1;
- result1_y = (int)(pt1_x*sin_theta + pt1_y*cos_theta + 0.5) + y1;
- result2_x = (int)(pt2_x*cos_theta - pt2_y*sin_theta + 0.5) + x1;
- result2_y = (int)(pt2_x*sin_theta + pt2_y*cos_theta + 0.5) + y1;
- result3_x = (int)(pt3_x*cos_theta - pt3_y*sin_theta + 0.5) + x1;
- result3_y = (int)(pt3_x*sin_theta + pt3_y*cos_theta + 0.5) + y1;
-
- /* compute min and max */
- min_x = x2;
- if (min_x > result1_x) min_x = result1_x;
- if (min_x > result2_x) min_x = result2_x;
- if (min_x > result3_x) min_x = result3_x;
- min_y = y2;
- if (min_y > result1_y) min_y = result1_y;
- if (min_y > result2_y) min_y = result2_y;
- if (min_y > result3_y) min_y = result3_y;
- max_x = x2;
- if (max_x < result1_x) max_x = result1_x;
- if (max_x < result2_x) max_x = result2_x;
- if (max_x < result3_x) max_x = result3_x;
- max_y = y2;
- if (max_y < result1_y) max_y = result1_y;
- if (max_y < result2_y) max_y = result2_y;
- if (max_y < result3_y) max_y = result3_y;
-
- /* write back results */
- min_pt.x = min_x; min_pt.y = min_y;
- max_pt.x = max_x; max_pt.y = max_y;
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Find the min and max points bounding the arrowhead that would be drawn
- * at the second point on the given line. <p>
- *
- * @param int x1 first x coordinate of the line
- * @param int y1 first y coordinate of the line
- * @param int x2 second x coordinate of the line (arrow head point goes here)
- * @param int y2 second y coordinate of the line (arrow head point goes here)
- * @param Point min_pt returns holding the min x,y of the bound
- * @param Point max_pt returns holding the max x,y of the bound
- */
- public void arrowhead_bound( int x1, int y1, int x2, int y2,
- Point min_pt, Point max_pt)
- {
- arrowhead_bound(x1,y1,x2,y2,20,15,0.60,min_pt,max_pt);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /* Just forward all the rest of the operations... */
- public void translate(int x, int y) {g.translate(x,y);}
- public Color getColor() {return g.getColor();}
- public Color get_color() {return g.getColor();}
- public void setColor(Color c) {g.setColor(c);}
- public void set_color(Color c) {g.setColor(c);}
- public void setPaintMode() {g.setPaintMode();}
- public void set_paint_mode() {g.setPaintMode();}
- public void setXORMode(Color c) {g.setXORMode(c);}
- public void set_XOR_mode(Color c) {g.setXORMode(c);}
- public Font getFont() {return g.getFont();}
- public Font get_font() {return g.getFont();}
- public void setFont(Font font) {g.setFont(font);}
- public void set_font(Font font) {g.setFont(font);}
- public FontMetrics getFontMetrics() {return g.getFontMetrics();}
- public FontMetrics get_font_metrics() {return g.getFontMetrics();}
- public FontMetrics getFontMetrics(Font f) {return g.getFontMetrics(f);}
- public FontMetrics get_font_metrics(Font f) {return g.getFontMetrics(f);}
- public Rectangle getClipRect() {return g.getClipRect();}
- public Rectangle get_clip_rect() {return g.getClipRect();}
- public void clipRect(int x, int y, int w, int h) {g.clipRect(x,y,w,h);}
- public void clip_rect(int x, int y, int w, int h) {g.clipRect(x,y,w,h);}
- public void copyArea(int x, int y, int w, int h, int dx, int dy)
- {g.copyArea(x,y,w,h,dx,dy);}
- public void copy_area(int x, int y, int w, int h, int dx, int dy)
- {g.copyArea(x,y,w,h,dx,dy);}
- public void drawLine(int x1, int y1, int x2, int y2)
- {g.drawLine(x1,y1,x2,y2);}
- public void draw_line(int x1, int y1, int x2, int y2)
- {g.drawLine(x1,y1,x2,y2);}
- public void fillRect(int x, int y, int w, int h) {g.fillRect(x,y,w,h);}
- public void fill_rect(int x, int y, int w, int h) {g.fillRect(x,y,w,h);}
- public void drawRect(int x, int y, int w, int h) {g.drawRect(x,y,w,h);}
- public void draw_rect(int x, int y, int w, int h) {g.drawRect(x,y,w,h);}
- public void clearRect(int x, int y, int w, int h) {g.clearRect(x,y,w,h);}
- public void clear_rect(int x, int y, int w, int h) {g.clearRect(x,y,w,h);}
- public void drawRoundRect(int x, int y, int w, int h, int arcw, int arch)
- {g.drawRoundRect(x,y,w,h,arcw,arch);}
- public void draw_round_rect(int x, int y, int w, int h, int arcw, int arch)
- {g.drawRoundRect(x,y,w,h,arcw,arch);}
- public void fillRoundRect(int x, int y, int w, int h, int arcw, int arch)
- {g.fillRoundRect(x,y,w,h,arcw,arch);}
- public void fill_round_rect(int x, int y, int w, int h, int arcw, int arch)
- {g.fillRoundRect(x,y,w,h,arcw,arch);}
- public void draw3DRect(int x, int y, int w, int h, boolean raised)
- {g.draw3DRect(x,y,w,h,raised);}
- public void draw_3D_rect(int x, int y, int w, int h, boolean raised)
- {g.draw3DRect(x,y,w,h,raised);}
- public void fill3DRect(int x, int y, int w, int h, boolean raised)
- {g.fill3DRect(x,y,w,h,raised);}
- public void fill_3D_rect(int x, int y, int w, int h, boolean raised)
- {g.fill3DRect(x,y,w,h,raised);}
- public void drawOval(int x, int y, int w, int h) {g.drawOval(x,y,w,h);}
- public void draw_oval(int x, int y, int w, int h) {g.drawOval(x,y,w,h);}
- public void fillOval(int x, int y, int w, int h) {g.fillOval(x,y,w,h);}
- public void fill_oval(int x, int y, int w, int h) {g.fillOval(x,y,w,h);}
- public void drawArc(int x, int y, int w, int h, int start_ang, int arc_ang)
- {g.drawArc(x,y,w,h,start_ang, arc_ang);}
- public void draw_arc(int x, int y, int w, int h, int start_ang, int arc_ang)
- {g.drawArc(x,y,w,h,start_ang, arc_ang);}
- public void fillArc(int x, int y, int w, int h, int start_ang, int arc_ang)
- {g.fillArc(x,y,w,h,start_ang,arc_ang);}
- public void fill_arc(int x, int y, int w, int h, int start_ang, int arc_ang)
- {g.fillArc(x,y,w,h,start_ang,arc_ang);}
- public void drawPolygon(int xp[], int yp[], int np)
- {g.drawPolygon(xp,yp,np);}
- public void draw_polygon(int xp[], int yp[], int np)
- {g.drawPolygon(xp,yp,np);}
- public void drawPolygon(Polygon p) {g.drawPolygon(p);}
- public void draw_polygon(Polygon p) {g.drawPolygon(p);}
- public void fillPolygon(int xp[], int yp[], int np)
- {g.fillPolygon(xp,yp,np);}
- public void fill_polygon(int xp[], int yp[], int np)
- {g.fillPolygon(xp,yp,np);}
- public void fillPolygon(Polygon p) {g.fillPolygon(p);}
- public void fill_polygon(Polygon p) {g.fillPolygon(p);}
- public void drawString(String str, int x, int y) {g.drawString(str,x,y);}
- public void draw_string(String str, int x, int y) {g.drawString(str,x,y);}
- public void drawChars(char data[], int off, int len, int x, int y)
- {g.drawChars(data,off,len,x,y);}
- public void draw_chars(char data[], int off, int len, int x, int y)
- {g.drawChars(data,off,len,x,y);}
- public void drawBytes(byte data[], int off, int len, int x, int y)
- {g.drawBytes(data,off,len,x,y);}
- public void draw_bytes(byte data[], int off, int len, int x, int y)
- {g.drawBytes(data,off,len,x,y);}
- public boolean drawImage(Image img, int x, int y, ImageObserver observer)
- {return g.drawImage(img,x,y,observer);}
- public boolean draw_image(Image img, int x, int y, ImageObserver observer)
- {return g.drawImage(img,x,y,observer);}
- public boolean drawImage(Image img, int x, int y, int w, int h,
- ImageObserver obs)
- {return g.drawImage(img,x,y,w,h,obs);}
- public boolean draw_image(Image img, int x, int y, int w, int h,
- ImageObserver obs)
- {return g.drawImage(img,x,y,w,h,obs);}
- public boolean drawImage(Image img, int x, int y, Color bgcolor,
- ImageObserver obs)
- {return g.drawImage(img,x,y,bgcolor,obs);}
- public boolean draw_image(Image img, int x, int y, Color bgcolor,
- ImageObserver obs)
- {return g.drawImage(img,x,y,bgcolor,obs);}
- public boolean drawImage(Image img, int x, int y, int w, int h, Color bgcolor,
- ImageObserver obs)
- {return g.drawImage(img,x,y,w,h,bgcolor,obs);}
- public boolean draw_image(Image img, int x, int y, int w, int h,
- Color bgcolor, ImageObserver obs)
- {return g.drawImage(img,x,y,w,h,bgcolor,obs);}
- public void dispose() {g.dispose();}
- public void finalize() {g.finalize();}
-
- /** Convert to a human readable string. */
- public String toString()
- {
- return "sub_arctic.output.drawable{"+g.toString()+"}";
- }
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-